package com.tsll.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName stafftransfer
 */
public class Stafftransfer implements Serializable {
    /**
     * 调离编号
     */
    private Integer id;

    /**
     * 调离人员id
     */
    private Integer staffid;

    /**
     * 调离人员
     */
    private Staff staff;

    /**
     * 审核人员
     */
    private Staff auditor;


    /**
     * 旧部门id
     */
    private Integer deptid;

    /**
     * 新部门id
     */
    private Integer newdeptid;

    /**
     * 申请调离时间
     */
    @DateTimeFormat(pattern = "yyyy-MMM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date applytime;

    /**
     * 审核通过时间
     */
    @DateTimeFormat(pattern = "yyyy-MMM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date exitime;

    //新部门
    private Department dept;

    //旧部门
    private Department oldDept;


    /**
     * 审核人员id
     */
    private Integer exid;

    /**
     * 状态1表示被调离
     */
    private Integer state;

    private  String reject;

    private static final long serialVersionUID = 1L;

    public Department getOldDept() {
        return oldDept;
    }

    public void setOldDept(Department oldDept) {
        this.oldDept = oldDept;
    }

    public Department getDept() {
        return dept;
    }

    public void setDept(Department dept) {
        this.dept = dept;
    }

    /**
     * 调离编号
     */
    public Integer getId() {
        return id;
    }

    /**
     * 调离编号
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 调离人员id
     */
    public Integer getStaffid() {
        return staffid;
    }

    /**
     * 调离人员id
     */
    public void setStaffid(Integer staffid) {
        this.staffid = staffid;
    }



    /**
     * 旧部门id
     */
    public Integer getDeptid() {
        return deptid;
    }

    /**
     * 旧部门id
     */
    public void setDeptid(Integer deptid) {
        this.deptid = deptid;
    }

    /**
     * 新部门id
     */
    public Integer getNewdeptid() {
        return newdeptid;
    }

    /**
     * 新部门id
     */
    public void setNewdeptid(Integer newdeptid) {
        this.newdeptid = newdeptid;
    }

    /**
     * 申请调离时间
     */
    public Date getApplytime() {
        return applytime;
    }

    /**
     * 申请调离时间
     */
    public void setApplytime(Date applytime) {
        this.applytime = applytime;
    }

    /**
     * 审核通过时间
     */
    public Date getExitime() {
        return exitime;
    }

    /**
     * 审核通过时间
     */
    public void setExitime(Date exitime) {
        this.exitime = exitime;
    }

    /**
     * 审核人员id
     */
    public Integer getExid() {
        return exid;
    }

    /**
     * 审核人员id
     */
    public void setExid(Integer exid) {
        this.exid = exid;
    }

    /**
     * 状态1表示被调离
     */
    public Integer getState() {
        return state;
    }



    /**
     * 状态1表示被调离
     */
    public void setState(Integer state) {
        this.state = state;
    }

    public Staff getStaff() {
        return staff;
    }

    public void setStaff(Staff staff) {
        this.staff = staff;
    }

    public Staff getAuditor() {
        return auditor;
    }

    public void setAuditor(Staff auditor) {
        this.auditor = auditor;
    }

    public String getReject() {
        return reject;
    }

    public void setReject(String reject) {
        this.reject = reject;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Stafftransfer other = (Stafftransfer) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getStaffid() == null ? other.getStaffid() == null : this.getStaffid().equals(other.getStaffid()))
            && (this.getDeptid() == null ? other.getDeptid() == null : this.getDeptid().equals(other.getDeptid()))
            && (this.getNewdeptid() == null ? other.getNewdeptid() == null : this.getNewdeptid().equals(other.getNewdeptid()))
            && (this.getApplytime() == null ? other.getApplytime() == null : this.getApplytime().equals(other.getApplytime()))
            && (this.getExitime() == null ? other.getExitime() == null : this.getExitime().equals(other.getExitime()))
            && (this.getExid() == null ? other.getExid() == null : this.getExid().equals(other.getExid()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getStaffid() == null) ? 0 : getStaffid().hashCode());
        result = prime * result + ((getDeptid() == null) ? 0 : getDeptid().hashCode());
        result = prime * result + ((getNewdeptid() == null) ? 0 : getNewdeptid().hashCode());
        result = prime * result + ((getApplytime() == null) ? 0 : getApplytime().hashCode());
        result = prime * result + ((getExitime() == null) ? 0 : getExitime().hashCode());
        result = prime * result + ((getExid() == null) ? 0 : getExid().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", staffid=").append(staffid);
        sb.append(", deptid=").append(deptid);
        sb.append(", newdeptid=").append(newdeptid);
        sb.append(", applytime=").append(applytime);
        sb.append(", exitime=").append(exitime);
        sb.append(", exid=").append(exid);
        sb.append(", state=").append(state);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}